package sword;

/**
 * @Author: 海琳琦
 * @Date: 2022/5/30 11:10
 * https://leetcode.cn/problems/ti-huan-kong-ge-lcof/
 */
public class Title05 {

    public String replaceSpace(String s) {
        StringBuilder result = new StringBuilder();
        for (int i = 0; i < s.length(); i++) {
            char c = s.charAt(i);
            if (c == ' ') {
                result.append("%20");
            }else{
                result.append(c);
            }
        }
        return result.toString();
    }

    public static void main(String[] args) {

    }
}
